home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.0 / stk-3 / blt-for-STk-3.0 / blt.c next >
Encoding:
C/C++ Source or Header  |  1995-12-26  |  2.7 KB  |  90 lines

  1. /*
  2.  * bltInit.c --
  3.  *
  4.  * Copyright 1993-1994 by AT&T Bell Laboratories.
  5.  * Permission to use, copy, modify, and distribute this software
  6.  * and its documentation for any purpose and without fee is hereby
  7.  * granted, provided that the above copyright notice appear in all
  8.  * copies and that both that the copyright notice and warranty
  9.  * disclaimer appear in supporting documentation, and that the
  10.  * names of AT&T Bell Laboratories any of their entities not be used
  11.  * in advertising or publicity pertaining to distribution of the
  12.  * software without specific, written prior permission.
  13.  *
  14.  * AT&T disclaims all warranties with regard to this software, including
  15.  * all implied warranties of merchantability and fitness.  In no event
  16.  * shall AT&T be liable for any special, indirect or consequential
  17.  * damages or any damages whatsoever resulting from loss of use, data
  18.  * or profits, whether in an action of contract, negligence or other
  19.  * tortuous action, arising out of or in connection with the use or
  20.  * performance of this software.
  21.  *
  22.  */
  23.  
  24. #include <tcl.h>
  25.  
  26. #ifndef BLT_VERSION
  27. #define BLT_VERSION "1.9"
  28. #endif
  29.  
  30. /*
  31.  * The inclusion of contributed commands/widgets can be suppressed by
  32.  * defining the respective preprocessor symbol.
  33.  */
  34. #ifdef STk_CODE
  35. #include <stk.h>
  36. #ifndef USE_TK
  37. #  define USE_TK
  38. #endif
  39. #endif
  40.  
  41. extern int Blt_HtextInit _ANSI_ARGS_((Tcl_Interp *interp));
  42. extern int Blt_GraphInit _ANSI_ARGS_((Tcl_Interp *interp));
  43. extern int Blt_BarchartInit _ANSI_ARGS_((Tcl_Interp *interp));
  44. extern int Blt_TableInit _ANSI_ARGS_((Tcl_Interp *interp));
  45. extern int Blt_BusyInit _ANSI_ARGS_((Tcl_Interp *interp));
  46. extern int Blt_WindowInit _ANSI_ARGS_((Tcl_Interp *interp));
  47. extern int Blt_BitmapInit _ANSI_ARGS_((Tcl_Interp *interp));
  48. extern int Blt_DragDropInit _ANSI_ARGS_((Tcl_Interp *interp));
  49. extern int Blt_BellInit _ANSI_ARGS_((Tcl_Interp *interp));
  50. extern int Blt_CutbufferInit _ANSI_ARGS_((Tcl_Interp *interp));
  51.  
  52. PRIMITIVE STk_init_blt(void)
  53. {
  54.   extern Tcl_Interp *STk_main_interp;
  55.  
  56.     if (Blt_HtextInit(STk_main_interp) != TCL_OK) {
  57.     goto Error;
  58.     }
  59.     if (Blt_GraphInit(STk_main_interp) != TCL_OK) {
  60.     goto Error;
  61.     }
  62.     if (Blt_BarchartInit(STk_main_interp) != TCL_OK) {
  63.     goto Error;
  64.     }
  65.     if (Blt_TableInit(STk_main_interp) != TCL_OK) {
  66.     goto Error;
  67.     }
  68.     if (Blt_BusyInit(STk_main_interp) != TCL_OK) {
  69.     goto Error;
  70.     }
  71.     if (Blt_WindowInit(STk_main_interp) != TCL_OK) {
  72.     return TCL_ERROR;
  73.     }
  74.     if (Blt_DragDropInit(STk_main_interp) != TCL_OK) {
  75.     goto Error;
  76.     }
  77.     if (Blt_BellInit(STk_main_interp) != TCL_OK) {
  78.     goto Error;
  79.     }
  80.     if (Blt_CutbufferInit(STk_main_interp) != TCL_OK) {
  81.     goto Error;
  82.     }
  83.     if (Blt_BitmapInit(STk_main_interp) != TCL_OK) {
  84.     goto Error;
  85.     }
  86.     return UNDEFINED;
  87. Error:
  88.     STk_err("BLT initialization error.", NIL);
  89. }
  90.